<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组件中的数据存放问题</title>
</head>
<body>
    <div id="app">
        <cpn></cpn>
        <cpn1></cpn1>
    </div>
    <script type="text/x-handlebars-template" id="cpn">
        <div>
            <h1>script标签</h1>
            <p>{{message}}</p>
        </div>
    </script>

    <template id="cpn1">
        <div>
            <h1>{{title}}</h1>
            <p>内容</p>
        </div>
    </template>
</body>
    <script src="../js/vue.js"></script>
    <script>

        Vue.component('cpn',{
            template: '#cpn',
            data (){
                return {
                    message: '信息'
                }
            }
        })

        Vue.component('cpn1',{
            template: '#cpn1',
            data (){
                return {
                    title: 'template标签'
                }
            }
        })

        const app = new Vue({
            el: '#app',
            data: {
                message: 'hello',
            },
            methods: {

            },
            components: {

            }
        })
    </script>
</html>